<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */


/**
 * Smarty seconds cutter modifier plugin
 *
 * Type:     modifier<br>
 * Name:     seconds_cutter<br>
 * Purpose:  cutting seconds from date
 * @link http://smarty.php.net/manual/en/language.modifier.upper.php
 *          upper (Smarty online manual)
 * @author   Monte Ohrt <monte at ohrt dot com>
 * @param string
 * @return string
 */
function smarty_modifier_seconds_cutter($date) {
    return  preg_replace( "/([0-9]{2})\:([0-9]{2})\:([0-9]{2})/i", "$1:$2", $date ); 
}

?>
